<template>
  <div class="addstage">
    <el-dialog :visible.sync="dialog" :before-close="handleClose" title="添加阶段" width="600px">
      <el-form :model="form" label-width="130px">
        <el-form-item label="名称">
          <el-input v-model="form.name" style="width:260px;"/>
        </el-form-item>
        <el-form-item label="阶段描述">
          <el-input :rows="8" v-model="form.detail" type="textarea" style="width:260px;"/>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="handlePush">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    visibleDialog: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      form: {
        name: '',
        detail: ''
      }
    }
  },
  computed: {
    dialog() {
      return this.visibleDialog
    }
  },
  methods: {
    handleClose() {
      this.$emit('closeAddStage')
    },
    handlePush() {
      this.$emit('closeAddStage')
    }
  }
}
</script>

<style lang="scss">
.addstage {
  .el-dialog {
    border-radius: 5px;
  }
}
</style>
